package com.zoweunion.mechanic.dao.iot;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public interface AppManagementDao {

    /**
     * 轮播图设置_总记录数
     *
     * @return
     */
    int getPictureCount(@Param("reqMap") Map<String, Object> reqMap);

    /**
     * 轮播图设置_列表显示
     *
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> getPictureList(@Param("reqMap") Map<String, Object> reqMap);


    /**
     * 轮播图设置_列表显示
     *
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> getPictureDetailList(@Param("reqMap") Map<String, Object> reqMap, @Param("type") int type);

    /**
     * 轮播图设置_列表显示2
     *
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> getPictureDetailList2(@Param("reqMap") Map<String, Object> reqMap, @Param("type") int type);

    /**
     * 获取内部链接地址
     *
     * @return
     */
    List<Map<String, Object>> getInnerHrefPath();


    /**
     * 用户管理_获取服务商和游客的列表
     *
     * @return
     */
    List<Map<String, Object>> serverAndTourist(Map<String, Object> reqMap);

    /**
     * 轮播图设置_新增轮播图
     *
     * @param reqMap
     * @return
     */
    int insertPicture(@Param("reqMap") Map<String, Object> reqMap);

    /**
     * 轮播图设置_删除轮播图
     *
     * @param reqMap
     * @return
     */
    int deletePicture(@Param("reqMap") Map<String, Object> reqMap);

    /**
     * 根据主机厂、子服务商或服务商的主键ID(s_id)获取服务商的列表信息(用于轮播图功能页面)
     * @param paraMap
     * @return
     */
    List<Map<String, Object>> getSeverListForRotationChart(Map<String, Object> paraMap);

    List<Map<String, Object>> getRotationChartDataList(Map<String, Object> paraMap);

    List<Map<String, Object>> getRotationChartDataListForServer(Map<String, Object> paraMap);

    Map<String, Object> getRotationChartSettingForServer(Map<String, Object> paraMap);

    Map<String, Object> getRotationChartSettingForParentServer(Map<String, Object> paraMap);

    /**
     * 根据主机厂的主键ID更新子服务商的picture_num
     * @param paraMap
     * @return
     */
    int updateChildrenServerPictureNumByPId(Map<String, Object> paraMap);

    int updatePictureDetail(Map<String, Object> reqMap);

    int addPictureDetail(Map<String, Object> reqMap);
}
